<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {

    }

    public function boot()
    {
//        DB::connection()->enableQueryLog();
//        DB::listen(function ($query) {
//            if ($query->time > 500) {
//                WriteLog::write('mysql', 'doSql', 'SQL语句执行：' . $query->sql . '，参数：' . json_encode($query->bindings) . '， 耗时：' . $query->time . 'ms', 'mysql');
//            }
//        });
    }
}
